package xian.woniu.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import xian.woniu.entity.Appointment;
import xian.woniu.entity.Doctor;
import xian.woniu.entity.DoctorExample;
@Repository
public interface DoctorMapper {

    /**
     * 根据患者pid和预约状态查询出所有的预约记录
     */
    List selAppointmentByAstate(@Param("pid") Integer pid,@Param("astate") String astate);

    /**
     * 根据患者pid查询出所有的预约记录
     */
    List selAppointmentServiceRecord(Integer pid);

    /**
     * 根据患者pid查询出所有签约医生的信息
     */
    List selSignDocByPid(Integer pid);

    /**
     * 根据科室id和医院名称查询出所有可签约医生的信息
     */
    List selSignDoc(@Param("depid") Integer depid,@Param("dhospital")String dhospital);
    /**
     *     传入一个市的一个区，查询出这个区的所有医院
     */
    List selLocalDistrictHospital(@Param(value="districtName") String districtName);

    //获取全部用户状态为4的医生用户信息

    List<Doctor> getwaittask();

    int countByExample(DoctorExample example);

    int deleteByExample(DoctorExample example);

    int deleteByPrimaryKey(Integer did);

    int insert(Doctor record);

    int insertSelective(Doctor record);

    List<Doctor> selectByExampleWithBLOBs(DoctorExample example);

    List<Doctor> selectByExample(DoctorExample example);

    Doctor selectByPrimaryKey(Integer did);

    int updateByExampleSelective(@Param("record") Doctor record, @Param("example") DoctorExample example);

    int updateByExampleWithBLOBs(@Param("record") Doctor record, @Param("example") DoctorExample example);

    int updateByExample(@Param("record") Doctor record, @Param("example") DoctorExample example);

    int updateByPrimaryKeySelective(Doctor record);

    int updateByPrimaryKeyWithBLOBs(Doctor record);

    int updateByPrimaryKey(Doctor record);
}